﻿using Axiom.CodeManifold;
using Axiom.CodeManifold.Framework;
using Axiom.CodeManifold.Properties;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Axiom.CodeManifold.WPF.ViewModels
{
	public class CodeModelViewModel : ViewModelBase
	{
		public string CompanyName
		{
			get
			{
				return ReferenceData.CompanyName;
			}
			set
			{
				if (ReferenceData.CompanyName == value)
				{
					return;
				}
				ReferenceData.CompanyName = value;
				NotifyPropertyChanged("CompanyName");
			}
		}

		public EnvDTE80.DTE2 Env { get; set; }

		public string RelativeSolutionPath
		{
			get
			{
				return ReferenceData.RelativeSolutionPath;
			}
			set
			{
				if (ReferenceData.RelativeSolutionPath == value)
				{
					return;
				}
				ReferenceData.RelativeSolutionPath = value;
				NotifyPropertyChanged("RelativeSolutionPath");
			}
		}

		public string RootFolder
		{
			get
			{
				return ReferenceData.RootFolder;
			}
			set
			{
				if (ReferenceData.RootFolder == value)
				{
					return;
				}
				ReferenceData.RootFolder = value;
				NotifyPropertyChanged("RootFolder");
			}
		}

		public string SoftwareLicenseUrl
		{
			get
			{
				return ReferenceData.SoftwareLicenseUrl;
			}
			set
			{
				if (ReferenceData.SoftwareLicenseUrl == value)
				{
					return;
				}
				ReferenceData.SoftwareLicenseUrl = value;
				NotifyPropertyChanged("SoftwareLicenseUrl");
			}
		}

		public int SortRegionMinSize
		{
			get
			{
				return ReferenceData.RegionMinSize;
			}
			set
			{
				if (ReferenceData.RegionMinSize == value)
				{
					return;
				}
				ReferenceData.RegionMinSize = value;
				NotifyPropertyChanged("SortRegionMinSize");
			}
		}

		public bool UseRegions
		{
			get
			{
				return ReferenceData.UseRegions;
			}
			set
			{
				if (ReferenceData.UseRegions == value)
				{
					return;
				}
				ReferenceData.UseRegions = value;
				NotifyPropertyChanged("UseRegions");
			}
		}

		public bool UseUndoContext
		{
			get
			{
				return ReferenceData.UseUndoContext;
			}
			set
			{
				if (ReferenceData.UseUndoContext == value)
				{
					return;
				}
				ReferenceData.UseUndoContext = value;
				NotifyPropertyChanged("UseUndoContext");
			}
		}
	}
}
